#ifndef VIB_TERRAIN_FILE_LOADER_H
#define VIB_TERRAIN_FILE_LOADER_H

#include "TerrainFileManager.h"
#include "../util/Tokenizer.h"

namespace dataengine
{
	/**
	  Loads a Terrain model from a file in vibt format */
	class VibTerrainFileManager : public TerrainFileManager
	{
		private:
			auto_ptr< util::Tokenizer > m_tok;

		public:
			/** Constructor 
			  @param filename File to load the terrain from */
			VibTerrainFileManager(std::string filename);
			/** Destructor */
			~VibTerrainFileManager();

			/** Checks if the terrain can be loaded with this class */
			bool canLoadFile();
			/** Loads the terrain from the file */
			geom::TerrainModel loadFile();
			/** Saves a PolyTerrain to the file 
			  @param os PolyTerrain to save to the file */
			void saveToFile(const geom::TerrainModel &os);
	};
}
#endif
